package com.jctrip.hotel.source.service.hworld;

import java.io.UnsupportedEncodingException;
import java.util.List;

import com.jctrip.hotel.source.model.OrderDataResult;
import com.jctrip.hotel.source.model.PriceCheckParam;
import com.jctrip.hotel.source.model.hworld.req.HworldAddOrderReq;
import com.jctrip.hotel.source.model.hworld.req.HworldCancelOrderReq;
import com.jctrip.hotel.source.model.hworld.req.HworldCheckAvailabilityReq;
import com.jctrip.hotel.source.model.hworld.req.HworldGetCardInfoReq;
import com.jctrip.hotel.source.model.hworld.resp.*;
import com.jctrip.hotel.source.model.wehotel.req.OrderData;

/**
 * @Author henry
 * @Date 2023/5/29 21:48
 * @Description
 */
public interface HworldService {
    String parseHotelId(String innId);

    String parseInnId(String hotelId);

    /**
     * 获取华住token
     */
    HworldTokenResult token() throws UnsupportedEncodingException;

    /**
     * 获取华住 token 并存入redis
     */
    String tokenCache(String appId, String key);


    /**
     * 获取酒店id list
     */
    List<HworldHotelInfo> getHotelList(String appId, String key);

    /**
     * 获取酒店基础信息&房型
     */

    List<HworldHotelDetail> getHotelComplexList(String appId, String key, String hotelId);

    /**
     * 获取酒店房型
     */
    List<HworldHoteRoomType> getHotelRoomType(String appId, String key, String hotelId);

    /**
     * 查询会员价(协议价)房态信息
     */
    HworldRoomDTO getTMCRoomPrice(String appId, String key, String hotelId, String start, String end,
            String roomTypeCode, String memberLevel);

    /**
     * 获取华住TMC所有房态信息
     */
    List<HworldRoomDTO> getTMCAllRoomPrice(String appId, String key, String hotelId, String start, String end,
                                           String roomTypeCode, String memberLevel);

    HworldCheckAvailabilityDTO checkAvailability(String appId, String key, HworldCheckAvailabilityReq req);


    String addOrder(String appId, String key, HworldAddOrderReq req);

    OrderDataResult postOrder(String appId, String key, HworldAddOrderReq req, PriceCheckParam priceCheck);

    HworldOrderInfo queryOrder(String appId, String key, String orderId);

    OrderData queryOrderData(String appId, String key, String orderId);


    Boolean cancelOrder(String appId, String key, HworldCancelOrderReq req);

    HworldOrderInfo queryByRequestNo(String sourceId, String orderId);

    List<HworldActivityRuleListResult> getActivityRuleList(String appId, String key);

    List<HworldCardInfo> getCardInfo(String appId, String key, List<String> bookerIds);
}
